package com.itheima;

/**
 * 2025/3/22 9:05
 * 演示常见的运算符
 */
public class OperationDemo1 {
    public static void main(String[] args) {
        int b = 10;
        int a = 5;
        System.out.println(a / b);//2.5-->2   0.5-->0
        System.out.println(a % b);//1 5
        System.out.println("---------------");
        System.out.println("abc" + a);//abc5
        System.out.println(a + 5);//10
        System.out.println("itheima" + a + 'a');//itheima5a
        System.out.println(a + 'a' + "itheima");//102itheima
        System.out.println(a + 3 + "itheima" + 2 + a);//8itheima25

        int c = 123;
        int ge = c % 10;
        int shi = c / 10 % 10;
        int bai = c / 100 ;
        System.out.println("个位：" + ge);
        System.out.println("十位：" + shi);
        System.out.println("百位：" + bai);

    }
}
